<table id="list" class="items">
	<tr class="header">
		<th class="first">Type</th>
		<th class="second">Identifier</th>
		<th class="">Status</th>
		<th class="third">From</th>
		<th class="fourth">To</th>
		<th class="last"><%= @items.count %> <%= ((@items.count == 1)?"Item":"Items") %></th>
	</tr>
	<% for item in @page_results %>
	<tr class="row" onmouseover="this.className ='hover';" onmouseout="this.className = 'row';" 
		onclick="document.location.href = '<%= item_path(item) %>';">
		<!-- Item Type -->
		<% @type = item.item_type %>
		<td class="first"><%= (@type)?(@type.item_type):("No Type") %></td>
		<!-- Item ID -->
		<% @identifier = item.identifiers.first %>
		<td class="second"><%=h (@identifier)?(@identifier.identifier_value):("No ID") %></td>
		<!-- Status -->
		<% checkins = CheckIn.find_all_by_item_id(item.id, :order => "created_at DESC") %>
		<% @status = get_status(item, checkins) %>
		<td class="third"><%= @status %></td>
		<!-- Source Location -->
		<% @source_location = item.source %>
		<td class="fourth"><%= (@source_location)?(@source_location.name):("No Source") %></td>
		<!-- Destination Location -->
		<% @destination_location = item.destination %>
		<td class="fifth"><%= (@destination_location)?(@destination_location.name):("No Destination") %></td>
		<!-- Attributes Location -->
		<td class="last">
			<% item.item_attributes.each do |attribute| %>
				<em style="color:<%=h attribute.display_color %>;"><%= attribute.display_text %></em>
			<% end %>
		</td>
	</tr>
	<% end %>
</table>